package top.glkj.hms.utils;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;

/**
 * @author : xgl
 * @version : 0.0.1
 * @date :2020/11/1 0:16
 */
public enum Status implements Serializable {
    /**
     * 状态删除
     */
    Delete("删除", 404,"error"),
    /**
     * 状态禁用
     */
    Disable("禁用", 500,"purple"),
    /**
     * 状态启用
     */
    Enable("启用", 200,"primary"),
    /**
     * 状态锁定
     */
    Lock("锁定", 400,"warning"),
    /**
     * 状态解除锁定
     */
    Unlock("解除锁定", 402,"blue"),
    /**
     * 状态解除锁定
     */
    NoPassWord("密码过期", 308,"red"),
    /**
     * 空闲
     */
    Idle("空闲",1101,"write"),
    /**
     * 清洁中
     */
    Cleaning("清洁中",1102,"#feeeed"),
    /**
     * 待入住
     */
    ToStay("待入住",1103,"#905a3d"),
    /**
     * 退房中
     */
    CheckingOut("退房中",1104,"#2e3a1f"),
    /**
     * 续费中
     */
    LeaseRenewal("续费中",1105,"#d93a49"),
    /**
     * 已入住
     */
    CheckedIn("已入住",1106,"#694d9f"),
    /**
     * 待续费
     */
    ToBeRenewed("待续费",1108,"#f15a22"),
    /**
     * 已结算
     */
    Settled("已结算",1109,"#33a3dc"),
    /**
     * 待支付
     */
    ToBePaid("待支付",1201,"#ed1941"),
    /**
     * 待退款
     */
    PendingRefund("待退款",1202,"#96582a"),
    /**
     * 待审核
     */
    Pending("待审核",101,"#1d953f"),
    /**
     * 已审核
     */
    Audited("已审核",102,"#50b7c1"),
    /**
     * 已完成
     */
    Finnish("已完成",2000,"#009ad6"),
    /**
     * 预订
     */
    Booking("预订",1203,"#ea66a6"),
    /**
     * 待授权
     */
    PendingAuthorization("待授权",1204,"#63434f"),
    /**
     * 结束
     */
    End("结束",999,"#281f1d"),
    /**
     * 装修中
     */
    InRenovation("装修中",1404,"#74787c"),
    /**
     * 新置，新添加的
     */
    NewHome("新置",1200,"#ff0ef9"),
    /**
     * 已装修
     */
    Renovated("已装修",1500,"#afb4db"),
    /**
     * 简装修
     */
    JaneDecoration("简装修",1501,"#2a5caa"),
    /**
     * 精装修
     */
    Exquisite("精装修",1599,"#224b8f"),
    /**
     * 家具齐全
     */
    FullyFurnished("家具齐全",1550,"#003a6c")
    ;

    static final long serialVersionUID = 20000213L;
    /**
     * 状态描述
     */
    private String description;
    /**
     * 状态码
     */

    private int code;

    private String color;
    Status(String description, int code,String color) {
        this.description = description;
        this.code = code;
        this.color = color;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(new StatusEntity(this.description, this.code, this.color));
    }
    @Data
    @AllArgsConstructor
    public static class StatusEntity{
        /**
         * 状态描述
         */
        private String value;
        /**
         * 状态码
         */

        private int code;

        private String color;
    }
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

}
